package com.example.event;

import org.springframework.context.ApplicationEvent;

/**
 * 广播事件模式
 * 没有名字,订阅的模块都会处理
 */
public class GenericEvent<T> extends ApplicationEvent {
    private final T payload;

    public GenericEvent(Object source, T payload) {
        super(source);
        this.payload = payload;
    }

    public T getPayload() {
        return payload;
    }
}